Imports System.Windows.Forms

Public Class dlgNewConnection

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        frmMain.CreateConnection(Me.txtName.Text, Me.txtAPN.Text, Me.txtUsername.Text, Me.txtPassword.Text)
        frmMain.RefreshConnections()
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub
End Class
